import axios from 'axios';
import {reactive} from "vue";

export default function () {
    let dogList: Array<string> = reactive([])

    async function getUrl() {
        try {
            let result = await axios.get("https://dog.ceo/api/breed/pembroke/images/random")
            console.log(result.data.message)
            dogList.push(result.data.message)
        } catch (error) {
            console.log(error)
        }
    }

    return {dogList,getUrl}
}